import React from 'react';
import { Spin } from 'antd';

interface LoadingProps {
  size?: 'small' | 'default' | 'large';
  tip?: string;
  className?: string;
}

const Loading: React.FC<LoadingProps> = ({ 
  size = 'large', 
  tip = '加载中...', 
  className 
}) => {
  return (
    <div 
      className={`loading-container ${className || ''}`}
      style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        minHeight: '100vh',
        background: '#f5f5f5',
      }}
    >
      <Spin size={size} tip={tip} />
    </div>
  );
};

export default Loading;
